package comparacion;

import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;

public class Graficos extends JFrame{

    private final String[] titulos1= {"Codigo3C","CodigoSW","Empresa"};
    private DefaultTableModel dtm = new DefaultTableModel();
    private JTable codigos= new JTable(getDtm()); 
    
    private JScrollPane scroll;
    
    public Graficos(){
        super("Comparacion bases de Datos");
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
        this.setSize(810, 460);
        this.addComponents();
        this.setVisible(true);
        Object[] o= {"Prueba 1","prueba 2","prueba 3"};
        dtm.addRow(o);
}

    public void addComponents() {
        getDtm().setColumnIdentifiers(titulos1);
        codigos.setEnabled(false);
        scroll = new JScrollPane(codigos);
        this.add(scroll);
    }
    public DefaultTableModel getDtm() {
        return dtm;
    }
    Object[] c = {null,null,null};
        
    public void setDtm(Object[] c) {
        this.c = c;
        this.dtm.addRow(c);
    }
    
}
